﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QS.Logic.Objects;
using Microsoft.Xna.Framework;
using QS.Drawables;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace QS.Game.Logic.Physics
{
    abstract class QAbstractForce : IDrawableObject
    {
        private QAbstractRenderer m_Renderer;
        private QPhysicsObject m_PhysicsObject;

        public QPhysicsObject PhysicsObject
        {
            get
            {
                return this.m_PhysicsObject;
            }
        }

        public QAbstractForce(QPhysicsObject physicsObject)
        {
            this.m_PhysicsObject = physicsObject;
        }

        public void Update(GameTime time)
        {
            updateForce();
        }

        protected abstract void updateForce();

        public Drawables.QAbstractRenderer Renderer
        {
            get
            {
                return this.m_Renderer;
            }
            set
            {
                this.m_Renderer = value;
            }
        }

        public void Draw(GraphicsDevice device, QCamera camera, SpriteBatch spriteBatch)
        {
            if (Renderer != null)
                this.Renderer.Draw(device, camera, spriteBatch, this);
        }


        public void Load(GraphicsDevice graphicsDevice, ContentManager contentManager)
        {
           
        }
    }
}
